﻿import tv.zarate.Utils.*;
import com.gskinner.events.GDispatcher;
/**
 *
 * @author
 * @version
 **/
class com.neshumah.SecuencePlayer   {
	private var _intervalo:Number;
	private var _int:Number;
	private var _play_status:Boolean;
	
	// Event Dispatcher properties
	var addEventListener:Function;
	var removeEventListener:Function;
	var dispatchEvent:Function;
	
	function SecuencePlayer(intervalo:Number){
		this._intervalo=intervalo;
		this._int=0;
		GDispatcher.initialize(this);
	}
	
	function star(){
		if(!this._play_status){
			this._int=setInterval(this, "launcher",  this._intervalo );
			this._play_status=true;
		}
	}
	private function launcher(){
		dispatchEvent({target:this,type:"token",status:null});
	}
	function stop(){
		clearInterval(this._int);
		this._play_status=false;
	}
	function pause(){
		this.stop();
	}
	
}